<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
         <script src="js/jquery.js"></script>
	</head>
	<body>
       
        	
        
      
        <script>
            
            /* 绑定事件 */
            	var r = confirm("亲，您确定删除这本书吗？它那么可爱，那么好看，能帮助你一路成长")
            	if (r == true) {
                    function GetQueryString(name){
                                    var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
                                    var r = window.location.search.substr(1).match(reg);
                                    if(r!=null)return  unescape(r[2]); return null;
                    
                    }
                    var name= GetQueryString("name");
                    $.ajax({
                      
                        type:'post',
                         url:'http://192.168.43.140:8080/delete1?book_id='+name,
                    
                        success:function(){
                             alert("删除成功");
                             window.location.href='table-basic.html';
                        },
                         error:function(){
                                alert("修改失败");
                               window.location.href='table-basic.html';
                            
                            
                            }
                            
                    })
                    
            	
            	} else {
                      window.location.href='table-basic.html';
            		
            	}
            
        	
           
         
                
            </script>
	</body>
</html>
